/* =====================================================
COLLECTIONS CONTAINER (blank slate for new design)
===================================================== */
.collections-container {
    min-height: 40vh;
    padding: var(--space-4, 16px);
    box-sizing: border-box;
}

/* =====================================================
SPECIALTY ITEMS - APPLE MINIMAL DESIGN (legacy, kept for reference)
Grid layout with rich grey/white gradient theme
===================================================== */

/* Skeleton Loading Styles */
.specialty-skeleton-card {
    pointer-events: none;
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

.specialty-skeleton-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    width: 30px;
    height: 12px;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s infinite;
}

.specialty-skeleton-image {
    width: 100%;
    aspect-ratio: 1.1;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: skeleton-shimmer 1.5s infinite;
}

.specialty-skeleton-name {
    width: 70%;
    height: 14px;
    margin: var(--space-1) auto;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s infinite;
}

.specialty-skeleton-id {
    width: 50%;
    height: 10px;
    margin: 0 auto var(--space-1);
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%);
    background-size: 200% 100%;
    border-radius: 4px;
    animation: skeleton-shimmer 1.5s infinite;
}

.specialty-skeleton-button {
    width: calc(100% - var(--space-4));
    height: 36px;
    margin: auto var(--space-2) var(--space-2);
    margin-top: auto;
    background: linear-gradient(90deg, rgba(0, 0, 0, 0.06) 25%, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.06) 75%);
    background-size: 200% 100%;
    border-radius: 8px;
    animation: skeleton-shimmer 1.5s infinite;
}

@keyframes skeleton-shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

@keyframes skeleton-pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

/* Specialty Type Filter Container - Horizontal Scrollable Chips */
.specialty-type-filter-container {
    /* Match header gradient - subtle continuation */
    padding: var(--space-1) var(--space-4);
    margin-bottom: 0 !important;
    /* Subtle border for separation */
    border-top: 0.5px solid rgba(0, 0, 0, 0.08);
    border-bottom: none !important;
    border-left: none;
    border-right: none;
    /* Gradient background matching header (mint only) */
    background: linear-gradient(to right,
        #FFFFFF 0%,
        #F6FFFB 20%,
        #EFFFF7 48%,
        #E7F9F0 74%,
        #F9FFFC 100%
    );
    /* Subtle shadow for depth */
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.04);
    /* Ensure it's part of fixed header */
    position: relative;
    z-index: 999;
    /* Light backdrop blur for iOS-like effect */
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    /* Allow horizontal scrolling */
    overflow-x: auto;
    overflow-y: hidden;
    /* Hide scrollbar for cleaner look */
    scrollbar-width: none;
    -ms-overflow-style: none;
    margin-top: 0;
}

.specialty-type-filter-container::-webkit-scrollbar {
    display: none;
}

.specialty-type-chips-scroll {
    display: flex;
    gap: var(--space-2);
    padding: var(--space-2) var(--space-1);
    min-height: 44px;
    align-items: center;
}

.specialty-type-chip {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    /* Inactive state - light background */
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: rgba(17, 24, 39, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: var(--radius-full);
    padding: var(--space-2) var(--space-4);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s var(--ease-stripe);
    white-space: nowrap;
    min-height: 36px;
    line-height: 1;
}

/* Active chip state */
.specialty-type-chip.active {
    background: linear-gradient(135deg, #10B981 0%, #14B8A6 100%);
    border-color: rgba(16, 185, 129, 0.95);
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.26), 0 1px 4px rgba(16, 185, 129, 0.18);
    font-weight: 600;
}

/* Hover states */
.specialty-type-chip:hover:not(.active) {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.12);
    color: rgba(17, 24, 39, 0.9);
    transform: translateY(-1px);
}

.specialty-type-chip:active {
    transform: translateY(0) scale(0.98);
}

/* Specialty Container - Light Ethereal Gradient Background */
.specialty-container {
    padding: var(--space-4);
    padding-top: var(--space-6);
    max-width: 100%;
    box-sizing: border-box;
    overflow-y: auto;
    overflow-x: hidden;
    min-height: 100vh;
    position: relative;
    /* Premium soft mint gradient (no pink) */
    background: linear-gradient(to bottom,
        #F6FFFB 0%,
        #EFFFF7 18%,
        #E7F9F0 40%,
        #EAF8F1 65%,
        #F9FFFC 100%
    );
    background-attachment: fixed; /* Keep gradient fixed while scrolling */
}

/* Subtle divider at top to separate from header/category filter */
.specialty-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, 
        transparent 0%, 
        rgba(255, 255, 255, 0.3) 20%, 
        rgba(255, 255, 255, 0.4) 50%, 
        rgba(255, 255, 255, 0.3) 80%, 
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

/* Empty State - Liquid Glass */
.specialty-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    text-align: center;
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.specialty-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 60vh;
    gap: var(--space-4);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.specialty-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Specialty Grid - 2 columns for 6 cards (6 rows x 2 columns) */
.specialty-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-2);
    max-width: 100%;
    box-sizing: border-box;
    margin-top: var(--space-2); /* Extra spacing from divider */
    padding-bottom: var(--space-4); /* Space for scrolling */
    align-items: start; /* Align cards to top */
    grid-auto-rows: 1fr; /* Make all rows same height */
}

/* Specialty Card - Liquid Glass Aesthetic - Compact size for 3 rows visible */
.specialty-card {
    /* Liquid Glass Background - Semi-transparent white with blur */
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    /* Smooth rounded edges */
    border-radius: 12px;
    overflow: hidden !important; /* CRITICAL: Prevent any overflow from child elements */
    /* Liquid Glass Elevation */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 4px 16px rgba(0, 0, 0, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.5);
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%; /* Use full grid cell height */
    min-height: 0; /* Allow flexbox to shrink */
    cursor: pointer;
    /* Smooth edges */
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.8);
    /* Ensure consistent spacing */
    padding: 0;
    margin: 0;
    /* Prevent card from growing beyond grid cell */
    align-self: stretch;
}

.specialty-card:hover {
    transform: translateY(-4px);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 8px 24px rgba(0, 0, 0, 0.15),
        0 4px 12px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.8);
    border-top-color: rgba(255, 255, 255, 1);
}

.specialty-card:active {
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.95),
        0 4px 16px rgba(0, 0, 0, 0.12),
        0 2px 8px rgba(0, 0, 0, 0.08),
        0 0 0 1px rgba(255, 255, 255, 0.6);
}

/* Category Badge - Top Left, Liquid Glass - Compact size */
.specialty-card-badge {
    position: absolute;
    top: 4px;
    left: 4px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: rgba(107, 114, 128, 0.9);
    font-size: 8px;
    font-weight: 600;
    padding: 3px 6px;
    border-radius: 5px;
    z-index: 3;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Image Container - Liquid Glass - Reduced height - Fixed aspect ratio */
.specialty-card-image-container {
    width: 100%;
    aspect-ratio: 1.1;
    min-height: 0; /* Allow flexbox to control height */
    flex-shrink: 0; /* Don't shrink */
    display: flex;
    align-items: center;
    justify-content: center;
    /* Subtle gradient background with transparency */
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.1) 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    position: relative;
    cursor: pointer;
    border-radius: 10px 10px 0 0; /* Smooth top corners */
    /* Light grey border for image area */
    border: 1px solid rgba(229, 231, 235, 0.6);
    border-bottom: 1px solid rgba(229, 231, 235, 0.4);
    padding: var(--space-2);
    box-sizing: border-box;
}

.specialty-card-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Fit entire image without cropping - may be slightly smaller */
    display: block;
    border-radius: 6px; /* Slight rounding for image itself */
}

/* Upload Icon Overlay - Shows when admin mode is enabled - Reduced size */
.specialty-card-image-upload-icon {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    min-width: 28px;
    min-height: 28px;
    background: rgba(72, 146, 146, 0.9);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 2;
    transition: all 0.2s ease;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.specialty-card-image-upload-icon:hover {
    background: rgba(72, 146, 146, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.specialty-card-image-upload-icon:active {
    transform: scale(0.95);
}

.specialty-card-image-upload-icon svg {
    width: 14px;
    height: 14px;
    stroke-width: 2.5;
}

/* Placeholder "A" - Liquid Glass - Compact size */
.specialty-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    font-weight: 300;
    color: rgba(156, 163, 175, 0.7);
    /* Subtle glass effect */
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    border-radius: 6px; /* Match image border radius */
}

/* Product Name - 2 Lines with Ellipsis - Professional Left-Aligned */
.specialty-card-name {
    /* 2-line truncation with ellipsis */
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    text-overflow: ellipsis;
    
    /* Typography */
    font-size: 12px;
    font-weight: 600;
    line-height: 1.5;
    color: rgba(17, 24, 39, 0.9);
    text-align: left; /* Left-aligned for professional look */
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    
    /* Spacing - Fixed height for 2 lines: 12px font × 1.5 line-height × 2 = 36px */
    padding: 10px var(--space-2) 8px;
    min-height: 36px;
    max-height: 36px;
    margin-bottom: 0;
    
    /* Flexbox - Don't grow, allow shrink */
    flex: 0 1 auto;
    
    /* Layout */
    box-sizing: border-box;
    margin: 0;
    position: relative;
}

/* ID and Price Container - Same line, ID left, Price right */
.specialty-card-id-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px var(--space-2) 6px;
    min-height: 20px;
    box-sizing: border-box;
    margin: 0;
}

/* Product ID - Small, Light Grey, Left aligned */
.specialty-card-id {
    font-size: 9px;
    color: rgba(156, 163, 175, 0.9);
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    margin: 0;
    flex: 0 0 auto;
}

/* Price - Medium Grey, Right aligned */
.specialty-card-price {
    font-size: 11px;
    color: rgba(107, 114, 128, 0.9);
    font-weight: 500;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.2;
    margin: 0;
    flex: 0 0 auto;
    margin-left: auto;
}

/* Add to Cart Button - Liquid Glass - Compact size - Fixed height */
.specialty-card-add-btn {
    width: calc(100% - var(--space-4));
    margin: auto var(--space-2) var(--space-2) 0; /* margin-top: auto pushes button to bottom */
    padding: var(--space-1.5) var(--space-2);
    font-size: 11px;
    /* Liquid Glass Button */
    background: rgba(72, 146, 146, 0.9);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    touch-action: manipulation;
    height: 44px; /* Fixed height */
    flex-shrink: 0; /* Don't shrink */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 4px 12px rgba(72, 146, 146, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
}

.specialty-card-add-btn:hover {
    background: rgba(72, 146, 146, 1);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 6px 16px rgba(72, 146, 146, 0.4),
        0 3px 8px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.specialty-card-add-btn:active {
    transform: translateY(0);
    background: rgba(58, 117, 117, 0.95);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 2px 8px rgba(72, 146, 146, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Quantity Controls - Horizontal Layout - Same height as Add to Cart button */
.specialty-card-quantity-controls {
    width: calc(100% - var(--space-4));
    margin: auto var(--space-2) var(--space-2) 0; /* margin-top: auto pushes controls to bottom - MUST MATCH BUTTON */
    height: 44px; /* Fixed height - same as Add to Cart button */
    min-height: 44px;
    max-height: 44px;
    flex-shrink: 0; /* Don't shrink */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-1);
    box-sizing: border-box;
}

/* Quantity Buttons (- and +) */
.specialty-quantity-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    /* Liquid Glass Button */
    background: rgba(72, 146, 146, 0.9);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 12px;
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    touch-action: manipulation;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 4px 12px rgba(72, 146, 146, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    user-select: none;
    -webkit-user-select: none;
}

.specialty-quantity-btn:hover {
    background: rgba(72, 146, 146, 1);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 6px 16px rgba(72, 146, 146, 0.4),
        0 3px 8px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.specialty-quantity-btn:active {
    transform: translateY(0);
    background: rgba(58, 117, 117, 0.95);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 2px 8px rgba(72, 146, 146, 0.3),
        0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Quantity Input Field */
.specialty-quantity-input {
    flex: 1;
    height: 44px;
    min-height: 44px;
    max-height: 44px;
    padding: 0 var(--space-2);
    /* Liquid Glass Input */
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: rgba(17, 24, 39, 0.9);
    border: 1px solid rgba(72, 146, 146, 0.3);
    border-top: 1px solid rgba(72, 146, 146, 0.4);
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    cursor: text;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    touch-action: manipulation;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.5),
        0 2px 8px rgba(72, 146, 146, 0.2),
        0 1px 2px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
    outline: none;
}

.specialty-quantity-input:focus {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    border-color: rgba(72, 146, 146, 0.6);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.6),
        0 4px 16px rgba(72, 146, 146, 0.3),
        0 2px 4px rgba(0, 0, 0, 0.1);
}

.specialty-quantity-input::-webkit-inner-spin-button,
.specialty-quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    appearance: none;
    margin: 0;
}

/* Specialty Modal - Apple Minimal Design */
.specialty-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.specialty-modal:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.specialty-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
}

.specialty-modal-content {
    position: relative;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    /* Liquid Glass Background */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 20px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 20px 60px rgba(0, 0, 0, 0.3),
        0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin: var(--space-4);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.9);
}

.specialty-modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    color: #6b7280;
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.specialty-modal-close:hover {
    background: rgba(255, 255, 255, 1);
    color: #111827;
    transform: scale(1.1);
}

.specialty-modal-close:active {
    transform: scale(0.95);
}

.specialty-modal-image-container {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Subtle glass background */
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.3) 0%, 
        rgba(255, 255, 255, 0.1) 100%
    );
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    position: relative;
}

.specialty-modal-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.specialty-modal-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 120px;
    font-weight: 300;
    color: rgba(156, 163, 175, 0.6);
    /* Subtle glass background */
    background: linear-gradient(to bottom, 
        rgba(255, 255, 255, 0.2) 0%, 
        rgba(255, 255, 255, 0.05) 100%
    );
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.specialty-modal-info {
    padding: var(--space-6);
    text-align: center;
}

.specialty-modal-name {
    font-size: 20px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 var(--space-2) 0;
    line-height: 1.4;
}

.specialty-modal-id {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
}

.specialty-modal-price {
    font-size: 16px;
    color: rgba(70, 146, 145, 1);
    font-weight: 600;
    margin-top: var(--space-2);
}

.specialty-modal-add-btn {
    width: calc(100% - var(--space-12));
    margin: 0 var(--space-6) var(--space-6);
    padding: var(--space-4);
    /* Liquid Glass Button */
    background: rgba(72, 146, 146, 0.9);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-top: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    touch-action: manipulation;
    min-height: 44px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 4px 16px rgba(72, 146, 146, 0.3),
        0 2px 8px rgba(0, 0, 0, 0.1);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.specialty-modal-add-btn:hover {
    background: rgba(72, 146, 146, 1);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.4),
        0 6px 20px rgba(72, 146, 146, 0.4),
        0 3px 10px rgba(0, 0, 0, 0.15);
    border-color: rgba(255, 255, 255, 0.4);
}

.specialty-modal-add-btn:active {
    transform: translateY(0);
    background: rgba(58, 117, 117, 0.95);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 2px 10px rgba(72, 146, 146, 0.3),
        0 1px 4px rgba(0, 0, 0, 0.1);
}

/* Tablet - 3 columns */
@media (min-width: 768px) {
    .specialty-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-6);
    }
    
    .specialty-container {
        padding: var(--space-6);
    }
    
    .specialty-modal-content {
        max-width: 600px;
    }
}

/* Desktop - 4-5 columns */
@media (min-width: 1024px) {
    .specialty-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-6);
    }
    
    .specialty-container {
        padding: var(--space-8);
        max-width: 1400px;
        margin: 0 auto;
    }
    
    .specialty-modal-content {
        max-width: 700px;
    }
}

/* Large Desktop - 5 columns */
@media (min-width: 1440px) {
    .specialty-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* =====================================================
FLOATING CATEGORY FILTER BUTTON - LIQUID GLASS
===================================================== */

.specialty-category-floating-btn {
    position: fixed;
    bottom: 90px; /* Above bottom nav */
    right: var(--space-4);
    z-index: 9997; /* Below bottom nav (10002) and modals, but above content */
    display: none !important; /* Hidden by default, shown when specialty tab is active */
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    /* Black Liquid Glass Background - High contrast for light background */
    background: rgba(20, 20, 25, 0.85);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    color: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    touch-action: manipulation;
    min-height: 44px;
    pointer-events: none; /* Disable clicks when hidden */
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 4px 24px rgba(0, 0, 0, 0.3),
        0 2px 12px rgba(0, 0, 0, 0.2);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Override hidden class for floating button - ONLY show for Specialty tab */
.specialty-category-floating-btn:not(.hidden) {
    display: flex !important; /* Force display when not hidden */
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* Enable clicks when visible */
}

/* Ensure button is visible ONLY when specialty tab is active */
body:has(#specialtyTab.active) .specialty-category-floating-btn:not(.hidden) {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important; /* Enable clicks when visible */
}

/* Hide button when specialty tab is NOT active */
body:not(:has(#specialtyTab.active)) .specialty-category-floating-btn {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important; /* Disable clicks when hidden */
}

.specialty-category-floating-btn:hover {
    background: rgba(15, 15, 20, 0.95);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    transform: translateY(-2px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 6px 28px rgba(0, 0, 0, 0.4),
        0 3px 14px rgba(0, 0, 0, 0.25);
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 1);
}

.specialty-category-floating-btn:active {
    transform: translateY(0);
    background: rgba(10, 10, 15, 0.9);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.15),
        0 2px 12px rgba(0, 0, 0, 0.25),
        0 1px 6px rgba(0, 0, 0, 0.15);
}

.specialty-category-floating-btn svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    stroke-width: 2.5;
    opacity: 0.95;
    stroke: rgba(255, 255, 255, 0.98);
}

.specialty-category-floating-btn span {
    white-space: nowrap;
    display: inline-block !important; /* Always show text label */
    font-weight: 600;
    letter-spacing: 0.3px;
}

/* =====================================================
SPECIALTY CATEGORY FILTER SHEET - LIQUID GLASS
===================================================== */

.specialty-category-sheet {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10001; /* Above floating button */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    padding-top: var(--space-6);
}

.specialty-category-sheet:not(.hidden) {
    opacity: 1;
    visibility: visible;
}

.specialty-category-sheet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.specialty-category-sheet-content {
    position: relative;
    width: 100%;
    max-width: 500px;
    max-height: 85vh;
    margin-top: var(--space-2);
    /* Liquid Glass Background */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    border-radius: 24px;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        inset 0 -1px 0 rgba(255, 255, 255, 0.9),
        0 4px 24px rgba(0, 0, 0, 0.2),
        0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-top: 1px solid rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(255, 255, 255, 0.9);
    animation: slideDown 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.specialty-category-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-6);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.specialty-category-sheet-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: rgba(17, 24, 39, 0.9);
    margin: 0;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.specialty-category-sheet-close {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 50%;
    color: rgba(107, 114, 128, 0.9);
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.specialty-category-sheet-close:hover {
    background: rgba(255, 255, 255, 1);
    color: rgba(17, 24, 39, 1);
    transform: scale(1.1);
}

.specialty-category-sheet-close:active {
    transform: scale(0.95);
}

.specialty-category-sheet-body {
    padding: var(--space-2);
    overflow-y: auto;
    max-height: calc(85vh - 80px);
    flex: 1;
}

.specialty-category-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-5);
    margin-bottom: var(--space-2);
    /* Liquid Glass Background */
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(12px) saturate(180%);
    -webkit-backdrop-filter: blur(12px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-top: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    color: rgba(17, 24, 39, 0.9);
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    text-align: left;
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.08);
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.specialty-category-option-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-0.5);
    flex: 1;
}

.specialty-category-option-title {
    font-size: 16px;
    font-weight: 500;
    color: rgba(17, 24, 39, 0.9);
    line-height: 1.3;
}

.specialty-category-option-subtitle {
    font-size: 12px;
    font-weight: 400;
    color: rgba(107, 114, 128, 0.8);
    line-height: 1.2;
}

.specialty-category-separator {
    height: 1px;
    background: rgba(0, 0, 0, 0.08);
    margin: var(--space-4) 0;
}

.specialty-category-group-title {
    font-size: 13px;
    font-weight: 600;
    color: rgba(107, 114, 128, 0.9);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: var(--space-3) var(--space-5) var(--space-2);
    margin-top: var(--space-2);
}

.specialty-category-option:hover {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(16px) saturate(200%);
    -webkit-backdrop-filter: blur(16px) saturate(200%);
    transform: translateY(-1px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 1),
        0 4px 12px rgba(0, 0, 0, 0.12),
        0 2px 6px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.7);
}

.specialty-category-option:active {
    transform: translateY(0);
}

.specialty-category-option.selected {
    background: rgba(72, 146, 146, 0.15);
    border-color: rgba(72, 146, 146, 0.3);
    color: rgba(72, 146, 146, 1);
}

.specialty-category-option.selected .specialty-category-check {
    display: block;
    color: rgba(72, 146, 146, 1);
}

.specialty-category-option:not(.selected) .specialty-category-check {
    display: none;
}

.specialty-category-option span {
    flex: 1;
    text-align: left;
}

.specialty-category-check {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    stroke-width: 3;
}

/* Mobile adjustments - Keep 2 columns for 6 cards */
@media (max-width: 480px) {
    .specialty-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }
    
    .specialty-card {
        border-radius: 10px;
    }
    
    .specialty-card-image-container {
        aspect-ratio: 1.15;
    }
    
    .specialty-card-placeholder {
        font-size: 32px;
    }
    
    .specialty-card-badge {
        font-size: 7px;
        padding: 2px 5px;
        top: 3px;
        left: 3px;
    }
    
    .specialty-card-name {
        /* 2-line truncation with ellipsis */
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        text-overflow: ellipsis;
        
        /* Typography */
        font-size: 11px;
        line-height: 1.5;
        
        /* Spacing - Fixed height for 2 lines: 11px font × 1.5 line-height × 2 = 33px */
        padding: 8px var(--space-1.5) 6px;
        min-height: 33px;
        max-height: 33px;
        margin-bottom: 0;
        
        /* Flexbox - Don't grow, allow shrink */
        flex: 0 1 auto;
        
        /* Layout */
        box-sizing: border-box;
        margin: 0;
        position: relative;
    }
    
    .specialty-card-id-price {
        padding: 3px var(--space-1.5) 4px;
        min-height: 18px;
    }
    
    .specialty-card-id {
        font-size: 8px;
    }
    
    .specialty-card-price {
        font-size: 10px;
    }
    
    .specialty-card-add-btn {
        font-size: 10px;
        padding: var(--space-1) var(--space-2);
        margin: auto var(--space-1.5) var(--space-1.5) 0; /* margin-top: auto pushes button to bottom */
        height: 40px;
        min-height: 40px;
        max-height: 40px;
    }
    
    .specialty-card-quantity-controls {
        width: calc(100% - var(--space-3));
        margin: auto var(--space-1.5) var(--space-1.5) 0; /* margin-top: auto pushes controls to bottom - MUST MATCH BUTTON */
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        gap: var(--space-0.5);
        flex-shrink: 0; /* Don't shrink */
    }
    
    .specialty-quantity-btn {
        width: 40px;
        height: 40px;
        min-width: 40px;
        min-height: 40px;
        font-size: 16px;
    }
    
    .specialty-quantity-input {
        height: 40px;
        min-height: 40px;
        max-height: 40px;
        font-size: 14px;
        padding: 0 var(--space-1.5);
    }
    
    .specialty-category-floating-btn {
        bottom: 80px;
        right: var(--space-3);
        padding: var(--space-2.5) var(--space-3.5);
        font-size: 13px;
        gap: var(--space-1.5);
    }

    /* Always show text label on mobile */
    .specialty-category-floating-btn span {
        display: inline-block !important; /* Always show text label */
        font-size: 13px;
    }
    
    .specialty-category-sheet {
        padding-top: var(--space-4);
    }
    
    .specialty-category-sheet-content {
        max-height: 90vh;
        border-radius: 16px;
        margin-top: var(--space-1);
    }
    
    .specialty-category-sheet-body {
        max-height: calc(90vh - 80px);
    }
}

